Package List - API Documentation

Property summary
Property
  application_source type: string
  currentStatus type: string
  hourly_limit type: numeric
  http_status type: numeric
  last_api_call type: string
  My type: struct
  nextResetHits type: date
  password type: string
  remaining_hits type: numeric
  reset_time type: date
  screenname type: string
  userid type: string
  version type: string
Methods summary
 Constructors
 public Twitter
init(String username, String pass)
 Methods
 private string
buildURL(String method, String format, [Struct options], [string prefix])
 public string
createBlock(string id, [string format])
 public string
createFavorite(string id, [string format])
 public string
createFriendship(string id, [boolean follow], [string format])
 public string
createList([string user], [struct options], [string format])
 public string
deleteList([string user], [string list], [string format])
 public string
deleteMemberList([string user], [string list], [string member], [string format])
 public string
destroyBlock(string id, [string format])
 public string
destroyFavorite(string id, [string format])
 public string
 public string
destroyMessage(string id, [string format])
 public string
destroyStatus(string id, [string format])
 public string
endSession([string format])
 private string
execute(String uri, [Boolean require_credentials], [Boolean http_post], [string path])
 public string
follow(string id, [string format])
 public string
friendshipExists(String user_a, String user_b, [string format])
 public string
getFavorites([string id], [Struct options], [string format])
 public string
getFollowerIDs([Struct options], [string format])
 public string
getFollowers([Struct options], [string format])
 public string
getFriendIDs([Struct options], [string format])
 public string
getFriends([Struct options], [string format])
 public string
getFriendsTimeline([Struct options], [string format])
 public string
getHomeTimeline([struct options], [string format])
 public numeric
 public string
getList([string user], [string list], [string format])
 public string
getLists([string user], [struct options], [string format])
 public string
getListsSubscriber([string user], [string list], [struct options], [string format])
 public string
getListSubscriber([string user], [string list], [struct options], [string format])
 public string
getMemberList([string user], [string list], [struct options], [string format])
 public string
getMembershipsList([string user], [struct options], [string format])
 public string
getMembersList([string user], [string list], [struct options], [string format])
 public string
getMentions([Struct options], [string format])
 public string
getMessages([Struct options], [string format])
 public string
 public numeric
 public string
getReplies([Struct options], [string format])
 public date
 public string
getSentMessages([Struct options], [string format])
 public string
getStatus(string id, [string format])
 public string
getStatusList([string user], [string list], [struct options], [string format])
 public string
getSubscriptionsList([string user], [struct options], [string format])
 public string
 public string
 public string
 public string
 public string
 public string
 public string
getUserTimeline([Struct options], [string format])
 public string
 private boolean
 public boolean
isTweet([string str])
 public string
 public numeric
 public string
leave(string id, [string format])
 public string
newMessage(String user, String text, [string format])
 public string
putMembersList([string user], [string list], [struct options], [string format])
 public string
putSubscribers([string user], [string list], [string format])
 public string
rateLimitStatus([boolean allusers], [string format])
 public string
reportingSpam(struct options, [string format])
 public string
retweetsByMeStatus([struct options], [string format])
 public string
retweetsOfMeStatus([struct options], [string format])
 public string
retweetsStatus(string id, [struct options], [string format])
 public string
retweetStatus(string id, [string format])
 public string
retweetsToMeStatus([struct options], [string format])
 public string
search(Struct options, [string format])
 public string
searchesCreate(string query, [string format])
 public string
searchesDestroy(string id, [string format])
 public string
 public string
searchesShow(string id, [string format])
 public string
searchUser(Struct options, [string format])
 private void
 private void
setUserid(String username)
 public string
showFriendship(struct options, [string format])
 public string
showUser([string screen_name], [string format])
 public string
showUserById(string user_id, [string format])
 public string
test(string id, [string format])
 public string
trendsAvailable(Struct options, [string format])
 public string
trendsLocation(numeric woeid, [string format])
 public string
unSubscribersList([string user], [string list], [struct options], [string format])
 public string
updateDeliveryDevice(string device, [string format])
 public string
updateList([string user], [string list], [struct options], [string format])
 public string
updateProfile(Struct options, [string format])
 public string
updateProfileColors(Struct options, [string format])
 public string
updateProfileImage(string path, [string format])
 public string
 public string
updateStatus(string status, [string in_reply_to_status_id], [string format])
 public string
 
Properties detail
application_source
Type
string
Show code
<cfproperty name="application_source" type="string" >
 
 

currentStatus

Type
string
Show code
<cfproperty name="currentStatus" type="string" >
 
 

hourly_limit

Type
numeric
Show code
<cfproperty name="hourly_limit" type="numeric" >
 
 

http_status

Type
numeric
Show code
<cfproperty name="http_status" type="numeric" >
 
 

last_api_call

Type
string
Show code
<cfproperty name="last_api_call" type="string" >
 
 

My

Type
struct
Show code
<cfproperty name="My" type="struct" >
 
 

nextResetHits

Type
date
Show code
<cfproperty name="nextResetHits" type="date">
 
 

password

Type
string
Show code
<cfproperty name="password" type="string" >
 
 

remaining_hits

Type
numeric
Show code
<cfproperty name="remaining_hits" type="numeric" >
 
 

reset_time

Type
date
Show code
<cfproperty name="reset_time" type="date" >
 
 

screenname

Type
string
Show code
<cfproperty name="screenname" type="string" >
 
 

userid

Type
string
Show code
<cfproperty name="userid" type="string" >
 
 

version

Type
string
Show code
<cfproperty name="version" type="string" >
 
 

Methods detail
buildURL

private string buildURL(String method, String format, [Struct options], [string prefix])

Parameters
String method  
 
String format  
 
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string prefix]    Not required.  Defaults to ""
 
Returns
string
 
 
Show code
    <cffunction name="buildURL" access="private" output="false" returntype="string">
      <cfargument name="method" type="String" required="true" >
      <cfargument name="format" type="String" required="true" >
      <cfargument name="options" type="Struct" required="false" default="#StructNew()#" >
      <cfargument name="prefix" type="string" required="false" default="" >
      <cfset var request = "http://#arguments.prefix#twitter.com/#arguments.method#.#arguments.format#" >
      <cfset var key = "" >
      <cfset var values = "" >
      <cfloop collection="#arguments.options#" item="key">
        <cfset values = ListAppend(values,'#lcase(key)#=#arguments.options[key]#','&') >
      </cfloop>
      <cfset request = "#request#?#values#" >
      <cfreturn request >
    </cffunction>

createBlock

public string createBlock(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="createBlock" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('blocks/create/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

createFavorite

public string createFavorite(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="createFavorite" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('favorites/create/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

createFriendship

public string createFriendship(string id, [boolean follow], [string format])

Parameters
string id  
 
[boolean follow]    Not required.  Defaults to true
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="createFriendship" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true">
      <cfargument name="follow" type="boolean" required="false" default="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset var options = StructNew() >
      <cfset options['follow'] = arguments.follow >
      <cfset uri = buildURL('friendships/create/#arguments.id#', arguments.format,options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

createList

public string createList([string user], [struct options], [string format])

Parameters
[string user]    Not required.
 
[struct options]   name,mode,description  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="createList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="name,mode,description" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/lists',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true,true) >
    </cffunction>

deleteList

public string deleteList([string user], [string list], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="deleteList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
	  <cfset var options = structnew() >
	  <cfset options["_method"]="DELETE" >
      <cfset uri = buildURL('1/#arguments.user#/lists/#arguments.list#',arguments.format,options,"api.") >
      <cfreturn execute(uri, true, true) >
    </cffunction>

deleteMemberList

public string deleteMemberList([string user], [string list], [string member], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[string member]    Not required.
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="deleteMemberList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="member" type="string" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset var options = Structnew() >
	  <cfset options["_method"]="DELETE" >
	  <cfset options["id"]=arguments.member >
      <cfset uri = buildURL('1/#arguments.user#/#arguments.list#/members',arguments.format,options,"api.") >
      <cfreturn execute(uri, true, true) >
    </cffunction>

destroyBlock

public string destroyBlock(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="destroyBlock" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('blocks/destroy/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

destroyFavorite

public string destroyFavorite(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="destroyFavorite" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('favorites/destroy/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

destroyFriendship

public string destroyFriendship(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="destroyFriendship" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('friendships/destroy/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

destroyMessage

public string destroyMessage(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="destroyMessage" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('direct_messages/destroy/#arguments.id#',arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

destroyStatus

public string destroyStatus(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="destroyStatus" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/destroy/#arguments.id#',arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

endSession

public string endSession([string format])

Parameters
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="endSession" access="public" output="false" returntype="string">
      <cfargument name="format" type="string" default="json" required="false" >
      <cfset var uri = buildURL('account/end_session', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

execute

private string execute(String uri, [Boolean require_credentials], [Boolean http_post], [string path])

Parameters
String uri  
 
[Boolean require_credentials]    Not required.  Defaults to false
 
[Boolean http_post]    Not required.  Defaults to false
 
[string path]    Not required.  Defaults to ""
 
Returns
string
 
 
Show code
    <cffunction name="execute" access="private" returntype="string">
      <cfargument name="uri" type="String" required="true" >
      <cfargument name="require_credentials" type="Boolean" required="false" default="false" >
      <cfargument name="http_post" type="Boolean" required="false" default="false" >
      <cfargument name="path" type="string" required="false" default="" >
      <cfset var contentFile = "Connection Timeout" >
      <cfset var methodType = 'get' >
      <cfset var pass = '' >
      <cfset var user = '' >
      <cfif isConnectionOpen()>
	      <cfif arguments.http_post>
	        <cfset methodType = 'post' >
	      </cfif>
	      <cfif arguments.require_credentials>
	        <cfset pass = password >
	        <cfset user = screenname >
	      </cfif>
	      <cftry>
	        <cfhttp username="#user#" password="#pass#" timeout="5" method="#methodType#" resolveURL="yes" url="#arguments.uri#">
	          <cfif methodType eq 'post'>
	            <cfhttpparam type="formfield" name="source" value="cftwitterlib">
	            <cfif Len(Trim(arguments.path)) >
	              <cfhttpparam type="file" name="image" file="#arguments.path#">
	            </cfif>
	          </cfif>
	        </cfhttp>
	        <cfset http_status = ListFirst(cfhttp.StatusCode, ' ') >
	        <cfset last_api_call = arguments.uri >
	        <cfset contentFile = cfhttp.Filecontent >
	        <cfset remaining_hits = remaining_hits - 1 >
	        <cfcatch type="coldfusion.runtime.RequestTimedOutException">
				<cfset http_status = 401 >
	            <cfset remaining_hits = 0 >
	            <cfset reset_time= dateAdd("h",1,now()) >
	        </cfcatch>
	      </cftry>
	  </cfif>
      <cfreturn contentFile >
    </cffunction>

follow

public string follow(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="follow" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('notifications/follow/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

friendshipExists

public string friendshipExists(String user_a, String user_b, [string format])

Parameters
String user_a  
 
String user_b  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="friendshipExists" access="public" output="false" returntype="string">
      <cfargument name="user_a" type="String" required="true" >
      <cfargument name="user_b" type="String" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset var options = StructNew() >
      <cfset options['user_a'] = arguments.user_a >
      <cfset options['user_b'] = arguments.user_b >
      <cfset uri = buildURL('friendships/exists', arguments.format,options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getFavorites

public string getFavorites([string id], [Struct options], [string format])

Parameters
[string id]    Not required.  Defaults to ""
 
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getFavorites" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" default="" required="false" >
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" default="json" required="false" >
      <cfset var uri = "" >
      <cfif Len(Trim(arguments.id))>
        <cfset uri = buildURL('favorites/#arguments.id#', arguments.format) >
        <cfelse>
        <cfset uri = buildURL('favorites', arguments.format) >
      </cfif>
      <cfreturn execute(uri, true) >
    </cffunction>

getFollowerIDs

public string getFollowerIDs([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getFollowerIDs" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('followers/ids', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getFollowers

public string getFollowers([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getFollowers" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/followers', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getFriendIDs

public string getFriendIDs([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getFriendIDs" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('friends/ids', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getFriends

public string getFriends([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getFriends" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/friends', arguments.format,arguments.options) >
      <cfreturn execute(uri) >
    </cffunction>

getFriendsTimeline

public string getFriendsTimeline([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getFriendsTimeline" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/friends_timeline', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getHomeTimeline

public string getHomeTimeline([struct options], [string format])

Parameters
[struct options]    Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getHomeTimeline" access="public" output="false" returntype="string">
      <cfargument name="options" type="struct" default="#structnew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/statuses/home_timeline',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri) >
    </cffunction>

getHourly_limit

public numeric getHourly_limit()

Returns
numeric
 
 
Show code
    <cffunction name="getHourly_limit" access="public" output="false" returntype="numeric">
      <cfreturn hourly_limit>
    </cffunction>

getList

public string getList([string user], [string list], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/lists/#arguments.list#',arguments.format,Structnew(),"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getLists

public string getLists([string user], [struct options], [string format])

Parameters
[string user]    Not required.
 
[struct options]   list_id,cursor  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getLists" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="list_id,cursor" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/lists',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getListsSubscriber

public string getListsSubscriber([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   keys list_id,cursor  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getListsSubscriber" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,cursor" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset uri = buildURL('1/#arguments.user#/#arguments.list#/subscribers',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getListSubscriber

public string getListSubscriber([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   keys list_id,user,id  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getListSubscriber" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,user,id" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/#arguments.list#/subscribers',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getMemberList

public string getMemberList([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   keys list_id,cursor  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getMemberList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,cursor" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset uri = buildURL('1/#arguments.user#/#arguments.list#/members',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getMembershipsList

public string getMembershipsList([string user], [struct options], [string format])

Parameters
[string user]    Not required.
 
[struct options]   keys list_id,cursor  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getMembershipsList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,cursor" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/lists/memberships',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getMembersList

public string getMembersList([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   keys list_id,cursor  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getMembersList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,cursor" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/#arguments.list#/members',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getMentions

public string getMentions([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getMentions" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/mentions', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getMessages

public string getMessages([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getMessages" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('direct_messages', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getPublicTimeline

public string getPublicTimeline([string format])

Parameters
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getPublicTimeline" access="public" output="false" returntype="string">
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/public_timeline', arguments.format) >
      <cfreturn execute(uri) >
    </cffunction>

getRemaining_hits

public numeric getRemaining_hits()

Returns
numeric
 
 
Show code
    <cffunction name="getRemaining_hits" access="public" output="false" returntype="numeric">
      <cfreturn remaining_hits>
    </cffunction>

getReplies

public string getReplies([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getReplies" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/replies', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getReset_time

public date getReset_time()

Returns
date
 
 
Show code
    <cffunction name="getReset_time" access="public" output="false" returntype="date">
      <cfreturn reset_time>
    </cffunction>

getSentMessages

public string getSentMessages([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getSentMessages" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('direct_messages/sent', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getStatus

public string getStatus(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getStatus" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/show/#arguments.id#',arguments.format) >
      <cfreturn execute(uri) >
    </cffunction>

getStatusList

public string getStatusList([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   since_id,max_id,per_page,page  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getStatusList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="since_id,max_id,per_page,page" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/lists/#arguments.list#/statuses',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getSubscriptionsList

public string getSubscriptionsList([string user], [struct options], [string format])

Parameters
[string user]    Not required.
 
[struct options]   keys list_id,cursor  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getSubscriptionsList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,cursor" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/lists/subscriptions',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

getTrends

public string getTrends()

Returns
string
 
 
Show code
    <cffunction name="getTrends" access="public" output="false" returntype="string">
      <cfreturn execute("http://search.twitter.com/trends.json") >
    </cffunction>

getTrendsCurrent

public string getTrendsCurrent([boolean exclude])

Parameters
[boolean exclude]    Not required.  Defaults to true
 
Returns
string
 
 
Show code
    <cffunction name="getTrendsCurrent" access="public" output="false" returntype="string">
      <cfargument name="exclude" default="true" required="false" type="boolean" >
      <cfset var excludetag = "" / >
      <cfif arguments.exclude>
        <cfset excludetag = "?exclude=hashtags" / >
      </cfif>
      <cfreturn execute("http://search.twitter.com/trends/current.json#excludetag#") >
    </cffunction>

getTrendsDaily

public string getTrendsDaily(Struct options)

Parameters
Struct options  
 
Returns
string
 
 
Show code
    <cffunction name="getTrendsDaily" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" required="true" >
      <cfset var uri = buildURL('trends/daily', 'json',arguments.options,'search.') >
      <cfreturn execute(uri) >
    </cffunction>

getTrendsWeekly

public string getTrendsWeekly(Struct options)

Parameters
Struct options  
 
Returns
string
 
 
Show code
    <cffunction name="getTrendsWeekly" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" required="true" >
      <cfset var uri = buildURL('trends/weekly', 'json',arguments.options,'search.') >
      <cfreturn execute(uri) >
    </cffunction>

getUserid

public string getUserid()

Returns
string
 
 
Show code
    <cffunction name="getUserid" access="public" output="false" returntype="string">
      <cfset var temp = '' >
      <cfif Not Len(Trim(userid))>
        <cfset setUserid(screenname) >
      </cfif>
      <cfreturn userid>
    </cffunction>

getUsername

public string getUsername()

Returns
string
 
 
Show code
    <cffunction name="getUsername" access="public" output="false" returntype="string">
      <cfreturn screenname>
    </cffunction>

getUserTimeline

public string getUserTimeline([Struct options], [string format])

Parameters
[Struct options]    Not required.  Defaults to #StructNew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="getUserTimeline" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" default="#StructNew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('statuses/user_timeline', arguments.format,arguments.options) >
      <cfreturn execute(uri, true) >
    </cffunction>

getVersion

public string getVersion()

Returns
string
 
 
Show code
    <cffunction name="getVersion" access="public" output="false" returntype="string">
      <cfreturn "7.0" >
    </cffunction>

init

public Twitter init(String username, String pass)

Parameters
String username  
 
String pass  
 
Returns
Twitter
 
 
Show code
    <cffunction name="init" access="public" returntype="Twitter">
      <cfargument name="username" type="String" required="true" >
      <cfargument name="pass" type="String" required="true" >
		<cfset Variables.http_status        = 401 >
		<cfset Variables.last_api_call      = "">
		<cfset Variables.application_source = "cftwitterlib">
		<cfset Variables.screenname         = arguments.username>
		<cfset Variables.password           = arguments.pass>
		<cfset Variables.version            = "9.0">
		<cfset Variables.My                 = StructNew()>
		<cfset Variables.currentStatus             = 'initialized'>
		<cfset Variables.nextResetHits         = DateAdd('h',1,now())>
		<cfset setRealRemainingHits()>
		<cfset setUserid(arguments.username)>
      <cfreturn this >
    </cffunction>

isConnectionOpen

private boolean isConnectionOpen()

Returns
boolean
 
 
Show code
	<cffunction name="isConnectionOpen" access="private" returntype="boolean"> 
		<cfset var ret = true>
		<cfset Variables.currentStatus = 'active'>
		<cfif Variables.remaining_hits lt 1 >
			<cfif DateDiff('h',Variables.nextResetHits,now()) gt 0 >
				<cfset Variables.nextResetHits = DateAdd('h',1,now())>
				<cfset setRealRemainingHits() >
				<cfif Variables.remaining_hits lt 1 >
					<cfset Variables.currentStatus = 'limit hits exceeded' >
					<cfset ret = false >
				</cfif>
			<cfelse>
				<cfset Variables.currentStatus = 'limit hits exceeded' >
				<cfset ret = false >
			</cfif>
		<cfelse>
			<cfset Variables.remaining_hits=Variables.remaining_hits-1>
		</cfif>
		<cfreturn ret>
	</cffunction>

isTweet

public boolean isTweet([string str])

Parameters
[string str]    Not required.  Defaults to json
 
Returns
boolean
 
 
Show code
    <cffunction name="isTweet" access="public" output="false" returntype="boolean">
      <cfargument name="str" type="string" required="false" default="json" >
      <cfif not Len(Trim(arguments.str)) or arguments.str contains "Connection Timeout" or arguments.str contains "Over capacity">>
        <cfreturn false>
      </cfif>
      <cfreturn true>
    </cffunction>

lastAPICall

public string lastAPICall()

Returns
string
 
 
Show code
    <cffunction name="lastAPICall" access="public" output="false" returntype="string">
      <cfreturn last_api_call >
    </cffunction>

lastStatusCode

public numeric lastStatusCode()

Returns
numeric
 
 
Show code
    <cffunction name="lastStatusCode" access="public" output="false" returntype="numeric">
      <cfreturn http_status >
    </cffunction>

leave

public string leave(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="leave" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('notifications/leave/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

newMessage

public string newMessage(String user, String text, [string format])

Parameters
String user  
 
String text  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="newMessage" access="public" output="false" returntype="string">
      <cfargument name="user" type="String" required="true" >
      <cfargument name="text" type="String" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset var options = StructNew() >
      <cfset options['user'] = arguments.user >
      <cfset options['text'] = arguments.text >
      <cfset uri = buildURL('direct_messages/new', arguments.format,options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

putMembersList

public string putMembersList([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   keys list_id,cursor  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="putMembersList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,cursor" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/#arguments.list#/members',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true,true) >
    </cffunction>

putSubscribers

public string putSubscribers([string user], [string list], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="putSubscribers" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset uri = buildURL('1/#arguments.user#/#arguments.list#/subscribers',arguments.format,structnew(),"api.") >
      <cfreturn execute(uri, true, true) >
    </cffunction>

rateLimitStatus

public string rateLimitStatus([boolean allusers], [string format])

Parameters
[boolean allusers]    Not required.  Defaults to true
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="rateLimitStatus" access="public" output="false" returntype="string">
      <cfargument name="allusers" type="boolean" default="true" required="false" >
      <cfargument name="format" type="string" default="json" required="false" >
      <cfset var uri = buildURL('account/rate_limit_status', arguments.format) >
      <cfreturn execute(uri, arguments.allusers) >
    </cffunction>

reportingSpam

public string reportingSpam(struct options, [string format])

Parameters
struct options  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="reportingSpam" access="public" output="false" returntype="string">
      <cfargument name="options" type="struct" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('report_spam', arguments.format, arguments.options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

retweetsByMeStatus

public string retweetsByMeStatus([struct options], [string format])

Parameters
[struct options]    Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="retweetsByMeStatus" access="public" output="false" returntype="string">
      <cfargument name="options" type="struct" default="#structnew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/statuses/retweeted_by_me',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

retweetsOfMeStatus

public string retweetsOfMeStatus([struct options], [string format])

Parameters
[struct options]    Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="retweetsOfMeStatus" access="public" output="false" returntype="string">
      <cfargument name="options" type="struct" default="#structnew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/statuses/retweets_of_me',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true, true) >
    </cffunction>

retweetsStatus

public string retweetsStatus(string id, [struct options], [string format])

Parameters
string id  
 
[struct options]    Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="retweetsStatus" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="options" type="struct" default="#structnew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/statuses/retweets/#arguments.id#',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true, true) >
    </cffunction>

retweetStatus

public string retweetStatus(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="retweetStatus" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/statuses/retweet/#arguments.id#',arguments.format,structnew(),"api.") >
      <cfreturn execute(uri, true, true) >
    </cffunction>

retweetsToMeStatus

public string retweetsToMeStatus([struct options], [string format])

Parameters
[struct options]    Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="retweetsToMeStatus" access="public" output="false" returntype="string">
      <cfargument name="options" type="struct" default="#structnew()#" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/statuses/retweeted_to_me',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

search

public string search(Struct options, [string format])

Parameters
Struct options  
 
[string format]    Not required.  Defaults to atom
 
Returns
string
 
 
Show code

searchesCreate

public string searchesCreate(string query, [string format])

Parameters
string query  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="searchesCreate" access="public" output="false" returntype="string">
      <cfargument name="query" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      	<cfset var uri = "">
		<cfset var options = StructNew() >
        <cfset options['query'] = arguments.query >
		<cfset var uri = buildURL('saved_searches/create', arguments.format,options) >
        <cfreturn execute(uri, true, true) >
    </cffunction>

searchesDestroy

public string searchesDestroy(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="searchesDestroy" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('saved_searches/destroy/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

searchesSaved

public string searchesSaved([string format])

Parameters
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="searchesSaved" access="public" output="false" returntype="string">
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('saved_searches', arguments.format) >
      <cfreturn execute(uri, true) >
    </cffunction>

searchesShow

public string searchesShow(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="searchesShow" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('saved_searches/show/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

searchUser

public string searchUser(Struct options, [string format])

Parameters
Struct options  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="searchUser" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/users/search', arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true) >
    </cffunction>

setRealRemainingHits

private void setRealRemainingHits()

Returns
void
 
 
Show code
	<cffunction name="setRealRemainingHits" access="private" returntype="void"> 
		<cfhttp url='http://twitter.com/account/rate_limit_status.json' />
		<cfset Struct                   = DeserializeJSON(cfhttp.FileContent)>
		<cfset Variables.reset_time     = CreateODBCDateTime(Struct.reset_time)>
		<cfset Variables.remaining_hits = Struct.remaining_hits>
	</cffunction>

setUserid

private void setUserid(String username)

Parameters
String username  
 
Returns
void
 
 
Show code
    <cffunction name="setUserid" access="private" output="false" returntype="void">
      <cfargument name="username" type="String" required="true" >
      <cfset var temp = '' >
      <cftry>
        <cfset temp 	 = xmlparse(showUser(username,'xml')) >
        <cfif StructKeyExists(temp,'user')>
          <cfset userid = temp.user.id.xmltext >
        </cfif>
        <cfcatch type="coldfusion.xml.XmlProcessException">
        </cfcatch>
      </cftry>
    </cffunction>

showFriendship

public string showFriendship(struct options, [string format])

Parameters
struct options  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="showFriendship" access="public" output="false" returntype="string">
      <cfargument name="options" type="struct" required="true">
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('friendships/show', arguments.format,arguments.options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

showUser

public string showUser([string screen_name], [string format])

Parameters
[string screen_name]    Not required.  Defaults to #getUsername()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="showUser" access="public" output="false" returntype="string">
      <cfargument name="screen_name" type="string" required="false" default="#getUsername()#" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = '' 							 >
      <cfset var option = StructNew()							 >
      <cfset option['screen_name'] = arguments.screen_name >
      <cfset uri = buildURL('users/show', arguments.format,option) >
      <cfreturn execute(uri) >
    </cffunction>

showUserById

public string showUserById(string user_id, [string format])

Parameters
string user_id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="showUserById" access="public" output="false" returntype="string">
      <cfargument name="user_id" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = '' 							 >
      <cfset var option = StructNew()							 >
      <cfset option['user_id'] = arguments.user_id >
      <cfset uri = buildURL('users/show', arguments.format,option) >
      <cfreturn execute(uri) >
    </cffunction>

test

public string test(string id, [string format])

Parameters
string id  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="test" access="public" output="false" returntype="string">
      <cfargument name="id" type="string" required="true" >
      <cfargument name="format" type="string" default="json" required="false" >
      <cfset var uri = buildURL('help/test/#arguments.id#', arguments.format) >
      <cfreturn execute(uri, true) >
    </cffunction>

trendsAvailable

public string trendsAvailable(Struct options, [string format])

Parameters
Struct options  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="trendsAvailable" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
	  <cfset var uri = buildURL('1/trends/available', arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri) >
    </cffunction>

trendsLocation

public string trendsLocation(numeric woeid, [string format])

Parameters
numeric woeid  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="trendsLocation" access="public" output="false" returntype="string">
      <cfargument name="woeid" type="numeric" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
	  <cfset var uri = buildURL('1/trends/#arguments.woeid#', arguments.format,StructNew(),"api.") >
      <cfreturn execute(uri,true) >
    </cffunction>

unSubscribersList

public string unSubscribersList([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   keys list_id,user  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="unSubscribersList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="keys list_id,user" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
	  <cfset arguments.options["_method"]="DELETE" >
      <cfset uri = buildURL('1/#arguments.user#/#arguments.list#/subscribers',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true, true) >
    </cffunction>

updateDeliveryDevice

public string updateDeliveryDevice(string device, [string format])

Parameters
string device  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="updateDeliveryDevice" access="public" output="false" returntype="string">
      <cfargument name="device" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset var options = StructNew() >
      <cfset options['device'] = arguments.device >
      <cfset uri = buildURL('account/update_delivery_advice', arguments.format,options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

updateList

public string updateList([string user], [string list], [struct options], [string format])

Parameters
[string user]    Not required.
 
[string list]    Not required.
 
[struct options]   name,mode,description  Not required.  Defaults to #structnew()#
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="updateList" access="public" output="false" returntype="string">
      <cfargument name="user" type="string" >
      <cfargument name="list" type="string" >
      <cfargument name="options" type="struct" default="#structnew()#" hint="name,mode,description" required="false" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('1/#arguments.user#/lists/#arguments.list#',arguments.format,arguments.options,"api.") >
      <cfreturn execute(uri, true,true) >
    </cffunction>

updateProfile

public string updateProfile(Struct options, [string format])

Parameters
Struct options  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="updateProfile" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('account/update_profile', arguments.format,arguments.options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

updateProfileColors

public string updateProfileColors(Struct options, [string format])

Parameters
Struct options  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="updateProfileColors" access="public" output="false" returntype="string">
      <cfargument name="options" type="Struct" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('account/update_profile_colors', arguments.format,arguments.options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

updateProfileImage

public string updateProfileImage(string path, [string format])

Parameters
string path  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="updateProfileImage" access="public" output="false" returntype="string">
      <cfargument name="path" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = buildURL('account/update_profile_image', arguments.format) >
      <cfreturn execute(uri, true, true,arguments.path) >
    </cffunction>

updateProfileImageBackground

public string updateProfileImageBackground(string path, string title, [string format])

Parameters
string path  
 
string title  
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="updateProfileImageBackground" access="public" output="false" returntype="string">
      <cfargument name="path" type="string" required="true" >
      <cfargument name="title" type="string" required="true" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset var options = StructNew() >
      <cfset options['title'] = arguments.title >
      <cfset uri = buildURL('account/update_profile_background_image', arguments.format,options) >
      <cfreturn execute(uri, true, true,arguments.path) >
    </cffunction>

updateStatus

public string updateStatus(string status, [string in_reply_to_status_id], [string format])

Parameters
string status  
 
[string in_reply_to_status_id]    Not required.  Defaults to ""
 
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="updateStatus" access="public" output="true" returntype="string">
      <cfargument name="status" type="string" required="true" >
      <cfargument name="in_reply_to_status_id" type="string" required="false" default="" >
      <cfargument name="format" type="string" required="false" default="json" >
      <cfset var uri = "" >
      <cfset var options = StructNew() >
      <cfset options['status'] = URLEncodedFormat(arguments.status) >
      <cfif Len(Trim(arguments.in_reply_to_status_id))>
        <cfset options['in_reply_to_status_id'] = arguments.in_reply_to_status_id >
      </cfif>
      <cfset uri = buildURL('statuses/update', arguments.format,options) >
      <cfreturn execute(uri, true, true) >
    </cffunction>

verifyCredentials

public string verifyCredentials([string format])

Parameters
[string format]    Not required.  Defaults to json
 
Returns
string
 
 
Show code
    <cffunction name="verifyCredentials" access="public" output="false" returntype="string">
      <cfargument name="format" type="string" default="json" required="false" >
      <cfset var uri = buildURL('account/verify_credentials', arguments.format) >
      <cfreturn execute(uri, true) >
    </cffunction>